Page({
  data: {
    exams: []
  },

  onLoad: function() {
    
    this.setData({
      exams: [
        {
          name: '专升本考试',
          time: '2024-04-10 09:00',
          description: '普通高等教育专科升本科考试。',
        },
        {
          name: '成考',
          time: '2024-11-20 09:00',
          description: '成人高等学校招生全国统一考试',
        },
        {
          name: '中考',
          time: '2024-06-15 09:00',
          description: '初中学业水平考试。',
        },
        {
          name: '高考',
          time: '2024-06-07 09:00',
          description: '普通高等学校招生全国统一考试',
        },
      ]
    });
  },

  goToExamPage: function(e) {
    const index = e.currentTarget.dataset.index;
    const selectedExam = this.data.exams[index];
    wx.navigateTo({
      // url: `/pages/examDetail/examDetail?name=${selectedExam.name}&time=${selectedExam.time}&description=${selectedExam.description}`,
      url: '/pages/edit-base/edit-base',
    });
  },
});
